<include file="../Public/header_sh.html" />
<script type="text/javascript">
$(function(){
	<php>	$time_now = time();$time_nm_ = date('Y-m',  time() );
	$time_3m = date('Y-m-d', strtotime("-2 months", paramDate( $time_nm_.'-01' ) ) );
	$time_nm = date('Y-m-d', strtotime("+1 months", paramDate( $time_nm_.'-01' ) ) );
	$time_nm = date('Y-m-d', strtotime("-1 days", paramDate( $time_nm ) ) );
	$time_15d = date('Y-m-d', strtotime("-14 days", time()) );
	$time_nd = date('Y-m-d', strtotime("+0 days", time()) );
	</php>
	$.kchart({
		chartWidth : 		"550" , //报表宽度
		chartHeight: 		"240" , //报表高度
		title : 			'商品总销售统计图' , //报表名称
		tableWrapperID : 	'stat_wrapper' , //表格数据table所在的html元素的id
		tableID : 			'graph_data' ,  //表格数据ID
		chartWarpperID : 	'chart_wrapper' , //统计图显示位置
		chartStyle : 		'bar' , //统计图样式  取值参见visualize相关参数
		url : 				"{:U('shanghu://Statis/ajxstatis',array('statmodel'=>'shanghu','order'=>'down'))}", //ajax获取数据路径
		ifTableDisplay:		false,//是否显示生成table，列表方式显示统计数据
		doAfterTableInit:	function(options_){}
	});
    $.kchart({
		chartWidth : 		"550px" , //报表宽度
		chartHeight: 		"240px" , //报表高度
		title : 			'近三个月店铺销售统计图' , //报表名称
		tableWrapperID : 	'stat_wrapper1' , //表格数据table所在的html元素的id
		tableID : 			'graph_data1' ,  //表格数据ID
		chartWarpperID : 	'chart_wrapper1' , //统计图显示位置
		chartStyle : 		'bar' , //统计图样式  取值参见visualize相关参数
		url : 				"{:U('shanghu://Statis/ajxstatis',array('statmodel'=>'goods','order'=>'down','stime'=>$time_3m,'etime'=>$time_nm,'timeexp'=>'month'))}", //ajax获取数据路径
		ifChangeXY:			true,
		ifTableDisplay:		false,//是否显示生成table，列表方式显示统计数据
		doAfterTableInit:	function(options_){}
	});
});

function _tmp_kchart(data_){
	$.kchart(data_);
}
</script>


    <!--  START CONTENT WRAPPER -->
    <div id="content_wrapper">
	
      <!--  START PRIMARY CONTENT style="position: relative;"-->
      <div id="primary_content">
	  	<div style="float:right;padding-top: 10px;">
			<a href="{:U('shanghu://Statis/index',array('statmodel'=>'goods'))}" title="查看商品销售统计">
				<img width="20" height="20" style="vertical-align: middle;" src="/Public/shanghu/images/chart_32.png">
			</a>
		</div>
        <h2>商品销售统计图&nbsp;&nbsp;&nbsp;&nbsp;
        	<span style="font-size:12px;">总共卖出：<font style="color: #FF9600;font-family: Arial,Helvetica,sans-serif;font-size: 18px;">{$totalsell}</font>&nbsp;件</span>
      	</h2>
        <div id="chart_wrapper" class="chart_wrapper content" style="height:320px"></div>
		<div id="stat_wrapper" ></div>
		
		<div style="float:right;padding-top: 10px;">
			<a href="{:U('shanghu://Statis/index',array('statmodel'=>'shanghu'))}" title="查看店铺销售统计">
				<img width="20" height="20" style="vertical-align: middle;" src="/Public/shanghu/images/chart_32.png">
			</a>
		</div>
		<h2>店铺销售统计图</h2>
		<div id="chart_wrapper1" class="chart_wrapper content" style="height:300px"></div>
		<div id="stat_wrapper1" ></div>
		
       
    <!-- Paginator end -->
     
      </div>
      <!--  END PRIMARY CONTENT -->

      
       <!--  START SIDEBAR -->
      <div id="sidebar">
      
        <h3>基本信息</h3>
        <ul>
         	<li class="last" style="padding-left:10px;padding-right:10px;">
         		<p style="float:right;">分类：{$partner['sort_id']|getCategoryName}</p>
            	<a href="#">{$partner.title}</a><br>
            	<p>地区：{:getAreaDesc($partner['province_id'],$partner['city_id'],$partner['area_id'])}</p>
             	<p>地址：{$partner.address}</p>
             	<p>联系方式：{$partner.contact}{$partner.phone}/{$partner.mobile}</p>
             	
          	</li>
         
        </ul>
        
        <h3>常用操作</h3>
       	<include file="../shanghu/Tpl/default/Public/quickoptlist.html" />
   
      </div><!--  end div #sidebar -->
      <!--  END SIDEBAR -->
      
    </div><!--  end div #content_wrapper -->
<!--  END CONTENT_WRAPPER -->

<include file="../Public/footer_sh.html" />
